<template>
   <div id="app">
      我是首页  {{counterStore.counter}}---{{counterStore.msg}}<br />
      <Son1></Son1>
      <Son2></Son2>
      
   </div>
</template>
<script setup>
import Son1 from "./components/son1.vue"
import Son2 from "./components/son2.vue"
import {useCounterStore} from "@/store/counter"
const counterStore = useCounterStore()
console.log(1,counterStore)

//解构：
// const {counter,msg} = counterStore //不建议 失去响应式
</script>
<style>
</style>


 
 
